<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>注册表单</title>
  <link rel="stylesheet" href="element-plus/index.css">
  <script src="js/vue.js"></script>
  <script src="element-plus/index.full.js"></script>
  <style>
    form {
      width: 400px;
      margin: 0 auto;
      padding: 20px;
      border: 1px solid #ccc;
      border-radius: 5px;
    }

    label {
      display: block;
      margin-bottom: 5px;
      text-align: left;
      width: 100px;
      float: left;
    }

    input {
      width: 280px;
      padding: 8px;
      margin-bottom: 15px;
      border: 1px solid #ccc;
      border-radius: 3px;
    }

    input[type="checkbox"] {
      width: auto;
      margin-right: 5px;
    }

    button {
      width: 100%;
      padding: 10px;
      background-color: #007bff;
      color: white;
      border: none;
      border-radius: 3px;
      cursor: pointer;
    }

    /* 新增样式，将版权声明和隐私保护设为蓝色 */
   .blue-text {
      color: blue;
    }
  </style>
</head>

<body>
  <div id='app'>
    <form>
      <div>
        <label for="account">帐号</label>
        <input type="text" id="account" v-model="formData.account" placeholder="请输入帐户">
      </div>
      <div>
        <label for="phone">手机</label>
        <input type="text" id="phone" v-model="formData.phone" placeholder="请输入手机号">
      </div>
      <div>
        <label for="email">邮箱</label>
        <input type="text" id="email" v-model="formData.email" placeholder="请输入邮箱">
      </div>
      <div>
        <label for="birthday">生日</label>
        <input type="date" id="birthday" v-model="formData.birthday" placeholder="请选择生日">
      </div>
      <div>
        <label for="password">密码</label>
        <input type="password" id="password" v-model="formData.password" placeholder="请输入密码">
      </div>
      <div>
        <label for="confirmPassword">确认密码</label>
        <input type="password" id="confirmPassword" v-model="formData.confirmPassword" placeholder="请再次输入密码">
      </div>
      <div>
        <input type="checkbox" id="agreeTerms" v-model="formData.agreeTerms">
        <!-- 调整文案结构，添加蓝色字体样式 -->
        <span>我已阅读并接受 <span class="blue-text">《版权声明》</span> 和 <span class="blue-text">《隐私保护》</span></span>
      </div>
      <div>
        <button :disabled="!formData.agreeTerms" @click="register">注册</button>
      </div>
    </form>
  </div>
  <script>
    Vue.createApp({
      data() {
        return {
          formData: {
            account: '',
            phone: '',
            email: '',
            birthday: '',
            password: '',
            confirmPassword: '',
            agreeTerms: false
          }
        }
      },
      methods: {
        register() {
          console.log('注册按钮被点击，表单数据：', this.formData);
        }
      }
    }).mount('#app')
  </script>
</body>

</html>    